package org.summerframework.component.security.oauth.wechat;

import org.summerframework.component.security.oauth.LoginType;
import org.summerframework.component.security.oauth.OAuthAppIdAndAppSecret;

public class WechatMobileOAuthSupper extends AbstractWechatOAuthSupper implements WechatOAuthInterceptor {
    private final WechatAppIdAndAppSecret weCatMobileAppIdAndAppSecret;

    public WechatMobileOAuthSupper(WechatAppIdAndAppSecret weCatMobileAppIdAndAppSecret) {
        this.weCatMobileAppIdAndAppSecret = weCatMobileAppIdAndAppSecret;
    }

    @Override
    public OAuthAppIdAndAppSecret getOAuthInfo() {
        return weCatMobileAppIdAndAppSecret;
    }

    @Override
    public boolean supportsType(LoginType loginType) {
        return LoginType.WECHAT_MOBILE == loginType;
    }
}
